
value = 0
def getClear(){
    value = 0
}

def add(number){
    value += number
}

def getTotal(){
    println "Total is $value"
}

clear
add 2
add 3
add 5

total



